package com.example.yiwei.crm.view.activity.jtCustomer;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;

import com.example.yiwei.crm.R;
import com.example.yiwei.crm.data.GetCustumer;
import com.example.yiwei.crm.entity.CustomerMessageEntity;

public class DetileSeacherCustomerActivity extends AppCompatActivity {
    private TextView  tv_name,tv_sex,tv_age,tv_phone,tv_bz,tv_zt,tv_manger,tv_bm,tv_next_time,tv_ctime,tv_next_conect,tv_qd;
    private CustomerMessageEntity customer;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_detile_seacher_customer);
        tv_name = (TextView) findViewById(R.id.coor_custmer_name);
        tv_sex = (TextView) findViewById(R.id.coor_custmer_de_sex);
        tv_age = (TextView) findViewById(R.id.coor_custmer_de_age);
        tv_phone = (TextView) findViewById(R.id.coor_custmer_de_number);
        tv_bz = (TextView) findViewById(R.id.coor_customer_bz);
        tv_qd = (TextView) findViewById(R.id.coor_customer_qd);
        tv_zt = (TextView) findViewById(R.id.coor_customer_de_gj);
        tv_manger = (TextView) findViewById(R.id.coor_customer_de_manger);
        tv_bm = (TextView) findViewById(R.id.coor_customer_de_bm);
        tv_next_time = (TextView) findViewById(R.id.coor_customer_next_time);
        tv_ctime = (TextView) findViewById(R.id.coor_customer_de_ctime);
        tv_next_conect = (TextView) findViewById(R.id.coor_customer_next_content);
        customer = GetCustumer.customers;
        tv_name.setText(customer.getClient_name());
        if (customer.getClient_gender()==1){
            tv_sex.setText("男");
        }else if (customer.getClient_gender()==2){
            tv_sex.setText("女");
        }
        tv_age.setText(customer.getClient_age()+"");
        tv_phone.setText(customer.getContact_phone_number());
        tv_bz.setText(customer.getDisease_category());
        tv_manger.setText(customer.getClient_manager_name());
        tv_bm.setText(customer.getBelongs_department());
        tv_next_time.setText(customer.getNext_Time());
        tv_ctime.setText(customer.getCreate_time());
        tv_next_conect.setText(customer.getNext_Content());
        tv_qd.setText(customer.getChannel_source());
        if (customer.getFollw_state()==0){
            tv_zt.setText("未预约");
        }
        if (customer.getFollw_state()==1){
            tv_zt.setText("已预约");
        }
        if (customer.getFollw_state()==2){
            tv_zt.setText("已就诊");
        }
        if (customer.getFollw_state()==5){
            tv_zt.setText("未手术");
        }
        if (customer.getFollw_state()==7){
            tv_zt.setText("已手术");
        }
        if (customer.getFollw_state()==10){
            tv_zt.setText("已出院");
        }
    }
}
